package net.alan.modules.repository;

import net.alan.modules.bean.NoteHistory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Author 李岩飞
 * Email eliyanfei@126.com
 * 2017/11/22
 */
public interface NoteHistoryRepository extends JpaRepository<NoteHistory, Integer> {

    Page<NoteHistory> findByUserIdAndNoteId(Integer userId, Integer noteId, Pageable pageable);

    void deleteByNoteId(Integer noteId);
}
